function getFolderContent(path){	
	$.ajax({
        url: '/resources/WebServices/ListFile.php?path='+path,
        cache: false,
        error: function(req, status, err)
        {
                return;
        },
        success: function(data)
        {
        	
        	
        	var newImageElement = '<img width="'+$(".info").css('width')+'" src="../../content/'+path+'/thumb.jpg" />';
        	if ( $(".info") )
        	{
        		$(".info").html(newImageElement);
        	}
        		
        	
        	var element = eval(data);
        	
        	if ( $(".listfile") )
        	{
        		$(".listfile").empty();
        	}
        	
     	   	for (i=0; i<element.length; i++)
     	   	{     	   		
     	   		var newElement = '<div class="file" id="'+element[i].path+'">'+element[i].path+'</div>';
     	   		
	            if ( $(".listfile") ){
	            	$(".listfile").append(newElement);
	            }
     	   	}
        	
        }
	});	
}

function getListFolder(){
	$.ajax({
        url: '/resources/WebServices/ListFolder.php',
        cache: false,
        error: function(req, status, err)
        {
                return;
        },
        success: function(data)
        {
        	
        	if (data != '')
        	{
        	   var element = eval(data);
        	   for (i=0; i<element.length; i++)
    		   {
	    		   var newElement = '<div class="folder folderClose" id="'+element[i].path+'"><div class="foldername">'+element[i].date+' '+element[i].project+'</div></div>';
	               if ( $(".listFolder") ){
	            	   $(".listFolder").append(newElement);
	               }
    		   }
        	   attachEventListener();
        	}
        	else
        	{
        		return;
        	}
        }
	});	
}